<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="utf-8">
	<title>图片查询</title>
	<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
	<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.0/css/bootstrap.min.css" rel="stylesheet">
	<script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.0/js/bootstrap.min.js"></script>
	<style>
	.box{
		width:500px;
		height: 200px;
		margin: 0 auto;
	}
	</style>
	<script>
	$(document).ready(function(){
		$("#submitBtn").click(function(){
			var url = "./login";
			var password = $("#password").val();
			var params = {
				password:password
			};
			$.post(url,params,function(data,status){
				console.log(data)
				if(data.code === "10000") {
					window.location.href = "./image/query";
				} else {
					alert(data.message);
				}
			},"json");
		});
	});
	</script>
</head>

<body>
	<form class="form-inline box">
		<div class="form-group mx-sm-3 mb-2">
			<label for="inputPassword2" class="sr-only">密码</label>
			<input type="password" class="form-control" id="password" placeholder="Password">
		</div>
		<a id="submitBtn" class="btn btn-primary mb-2">登录</a>
	</form>
</body>

</html>